package com.shse.dao;

import com.shse.meta.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by shse on 3/12/2016.
 */

@Repository
public interface UserDao {

    @Select("select * from users")
    public List<User> getAllUser();

    @Select("select * from users where userId=#{id}")
    public User getUserById(String id);

    @Select("select * from users where userName=#{userName} and password=#{password}")
    public User getUser(@Param("userName") String username, @Param("password") String password);
}
